<?php
$SceneID;

if (file_exists("config.xml")) {
	$config_xml = simplexml_load_file("config.xml");
} else {
	exit("Konnte Datei nicht laden. ");
}


if (isset($_GET["SceneID"])) {
	$SceneID = $_GET["SceneID"];
} else {
	echo "Bitte Szene mitgeben";
	exit;
}


		$path = '/config/Scenes/Scene[@sortID=\'' . $SceneID . '\']/Step';
		$steps_xml = $config_xml -> xpath($path);
		
		
		foreach ($steps_xml as $step) {
			$actor = $step->Actor;
			
			$path = '/config/Actors/Actor[@ID=\'' . $actor . '\']';
			$actors = $config_xml -> xpath($path);
			$actor = $actors[0]->Name	;		
			$action = $step->Action;
			echo "
			<li>
				<table width=100%>
				<tr><td width=80%> $actor</td><td width=20% >$action </td></tr>
				</table>
    		</li>
			";
		}
    
?>

